Skip to content

Add java-tron-up package#8825

Open
ulissesferreira wants to merge 5 commits into
mainfrom
add-java-tron-up-package
Open

Add java-tron-up package#8825
ulissesferreira wants to merge 5 commits into
mainfrom
add-java-tron-up-package

Conversation

@ulissesferreira
Copy link
Copy Markdown
Contributor

@ulissesferreira ulissesferreira commented May 15, 2026

Description

Adds @metamask/java-tron-up to the core monorepo using the generated package structure, then replaces the scaffold with the existing java-tron runtime installer implementation.

Ownership follows the runtime tooling/platform pattern and includes Networks, matching the Tron Snap ownership direction.

Changes

  • Adds the java-tron runtime installer package under packages/java-tron-up.
  • Publishes the java-tron-up CLI bin from dist/bin/java-tron-up.mjs.
  • Adds package references, lockfile entry, README package listing, CODEOWNERS, and teams.json ownership.

Verification

  • yarn workspace @metamask/java-tron-up run build
  • yarn workspace @metamask/java-tron-up run test
  • yarn eslint packages/java-tron-up
  • yarn constraints
  • yarn lint:misc --check packages/java-tron-up/package.json packages/java-tron-up/README.md packages/java-tron-up/src/index.ts packages/java-tron-up/src/install.ts packages/java-tron-up/src/install.test.ts packages/java-tron-up/src/bin/java-tron-up.ts packages/java-tron-up/jest.config.js .github/CODEOWNERS teams.json README.md tsconfig.json tsconfig.build.json
  • yarn readme-content:check
  • yarn lint:teams
  • yarn workspace @metamask/java-tron-up run changelog:validate

Note

Medium Risk
Adds a new CLI that downloads, verifies, caches, and executes external java-tron and Java runtime artifacts, so failures or supply-chain issues could affect CI/dev workflows. Impact is scoped to the new package and build/reference wiring (no existing runtime behavior changed).

Overview
Adds a new runtime-tooling package, @metamask/java-tron-up, including a java-tron-up CLI and exported install APIs to download, SHA-256 verify, cache, and install a platform-specific FullNode.jar plus a matching managed Java runtime, and generate a node_modules/.bin/java-tron wrapper.

Wires the package into the monorepo (TypeScript project references, yarn.lock, README package list) and sets ownership via CODEOWNERS/teams.json, with initial docs, licenses, typedoc config, and Jest tests covering install/cache/cleanup behavior.

Reviewed by Cursor Bugbot for commit 7ad3fd3. Bugbot is set up for automated code reviews on this repo. Configure here.

@ulissesferreira ulissesferreira requested a review from a team as a code owner May 15, 2026 11:35
@ulissesferreira
Copy link
Copy Markdown
Contributor Author

Code sync follow-up:

  • Compared the PR package source against @ulissesferreira/java-tron-up@0.1.2.
  • The implementation, CLI, and tests match the latest released source, with only expected MetaMask/core adaptations (@metamask package metadata, Jest test harness, lint/type annotations, ts-bridge build config).
  • Verified in MetaMask/core: yarn workspace @metamask/java-tron-up run test and yarn workspace @metamask/java-tron-up run build both completed successfully.

Comment thread packages/java-tron-up/src/install.ts
@ulissesferreira
Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

1 similar comment
@ulissesferreira
Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@ulissesferreira
Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions
Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@7.4.0-preview-73cf60340
@metamask-previews/accounts-controller@38.1.1-preview-73cf60340
@metamask-previews/address-book-controller@7.1.2-preview-73cf60340
@metamask-previews/ai-controllers@0.6.3-preview-73cf60340
@metamask-previews/analytics-controller@1.0.1-preview-73cf60340
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-73cf60340
@metamask-previews/announcement-controller@8.1.0-preview-73cf60340
@metamask-previews/app-metadata-controller@2.0.1-preview-73cf60340
@metamask-previews/approval-controller@9.0.1-preview-73cf60340
@metamask-previews/assets-controller@7.1.2-preview-73cf60340
@metamask-previews/assets-controllers@108.1.0-preview-73cf60340
@metamask-previews/authenticated-user-storage@2.0.0-preview-73cf60340
@metamask-previews/base-controller@9.1.0-preview-73cf60340
@metamask-previews/base-data-service@0.1.3-preview-73cf60340
@metamask-previews/bridge-controller@72.0.4-preview-73cf60340
@metamask-previews/bridge-status-controller@71.1.4-preview-73cf60340
@metamask-previews/build-utils@3.0.4-preview-73cf60340
@metamask-previews/chain-agnostic-permission@1.6.1-preview-73cf60340
@metamask-previews/chomp-api-service@3.1.0-preview-73cf60340
@metamask-previews/claims-controller@0.5.1-preview-73cf60340
@metamask-previews/client-controller@1.0.1-preview-73cf60340
@metamask-previews/compliance-controller@2.0.1-preview-73cf60340
@metamask-previews/composable-controller@12.0.1-preview-73cf60340
@metamask-previews/config-registry-controller@0.3.1-preview-73cf60340
@metamask-previews/connectivity-controller@0.2.0-preview-73cf60340
@metamask-previews/controller-utils@12.1.0-preview-73cf60340
@metamask-previews/core-backend@6.3.0-preview-73cf60340
@metamask-previews/delegation-controller@3.0.0-preview-73cf60340
@metamask-previews/earn-controller@12.1.2-preview-73cf60340
@metamask-previews/eip-5792-middleware@3.0.4-preview-73cf60340
@metamask-previews/eip-7702-internal-rpc-middleware@0.1.1-preview-73cf60340
@metamask-previews/eip1193-permission-middleware@2.0.1-preview-73cf60340
@metamask-previews/ens-controller@19.1.3-preview-73cf60340
@metamask-previews/eth-block-tracker@15.0.1-preview-73cf60340
@metamask-previews/eth-json-rpc-middleware@23.1.3-preview-73cf60340
@metamask-previews/eth-json-rpc-provider@6.0.1-preview-73cf60340
@metamask-previews/foundryup@1.0.1-preview-73cf60340
@metamask-previews/gas-fee-controller@26.2.1-preview-73cf60340
@metamask-previews/gator-permissions-controller@4.1.2-preview-73cf60340
@metamask-previews/geolocation-controller@0.1.3-preview-73cf60340
@metamask-previews/java-tron-up@0.0.0-preview-73cf60340
@metamask-previews/json-rpc-engine@10.5.0-preview-73cf60340
@metamask-previews/json-rpc-middleware-stream@8.0.8-preview-73cf60340
@metamask-previews/keyring-controller@25.5.0-preview-73cf60340
@metamask-previews/logging-controller@8.0.2-preview-73cf60340
@metamask-previews/message-manager@14.1.2-preview-73cf60340
@metamask-previews/messenger@1.2.0-preview-73cf60340
@metamask-previews/messenger-cli@0.2.0-preview-73cf60340
@metamask-previews/money-account-balance-service@1.0.2-preview-73cf60340
@metamask-previews/money-account-controller@0.3.0-preview-73cf60340
@metamask-previews/money-account-upgrade-controller@2.0.2-preview-73cf60340
@metamask-previews/multichain-account-service@10.0.0-preview-73cf60340
@metamask-previews/multichain-api-middleware@3.1.2-preview-73cf60340
@metamask-previews/multichain-network-controller@3.1.1-preview-73cf60340
@metamask-previews/multichain-transactions-controller@7.1.0-preview-73cf60340
@metamask-previews/name-controller@9.1.2-preview-73cf60340
@metamask-previews/network-controller@32.0.0-preview-73cf60340
@metamask-previews/network-enablement-controller@5.1.1-preview-73cf60340
@metamask-previews/notification-services-controller@24.1.0-preview-73cf60340
@metamask-previews/passkey-controller@2.0.1-preview-73cf60340
@metamask-previews/permission-controller@13.1.1-preview-73cf60340
@metamask-previews/permission-log-controller@5.1.0-preview-73cf60340
@metamask-previews/perps-controller@6.1.0-preview-73cf60340
@metamask-previews/phishing-controller@17.2.0-preview-73cf60340
@metamask-previews/polling-controller@16.0.5-preview-73cf60340
@metamask-previews/preferences-controller@23.1.0-preview-73cf60340
@metamask-previews/profile-metrics-controller@3.1.4-preview-73cf60340
@metamask-previews/profile-sync-controller@28.1.0-preview-73cf60340
@metamask-previews/ramps-controller@13.3.1-preview-73cf60340
@metamask-previews/rate-limit-controller@7.0.1-preview-73cf60340
@metamask-previews/react-data-query@0.2.1-preview-73cf60340
@metamask-previews/remote-feature-flag-controller@4.2.1-preview-73cf60340
@metamask-previews/sample-controllers@5.0.1-preview-73cf60340
@metamask-previews/seedless-onboarding-controller@9.1.0-preview-73cf60340
@metamask-previews/selected-network-controller@26.1.3-preview-73cf60340
@metamask-previews/shield-controller@5.1.2-preview-73cf60340
@metamask-previews/signature-controller@39.2.2-preview-73cf60340
@metamask-previews/snap-account-service@0.1.0-preview-73cf60340
@metamask-previews/social-controllers@2.2.1-preview-73cf60340
@metamask-previews/storage-service@1.0.1-preview-73cf60340
@metamask-previews/subscription-controller@6.1.3-preview-73cf60340
@metamask-previews/transaction-controller@65.4.0-preview-73cf60340
@metamask-previews/transaction-pay-controller@22.5.0-preview-73cf60340
@metamask-previews/user-operation-controller@41.2.2-preview-73cf60340
@metamask-previews/wallet@0.0.0-preview-73cf60340

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 82b6ec4. Configure here.

Comment thread packages/java-tron-up/src/install.ts
@@ -0,0 +1,352 @@
/* eslint-disable jest/expect-expect, n/no-sync */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we aren't using Jest expectations in this file?

// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
branches: 35,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we do not have full test coverage?

@@ -0,0 +1,18 @@
export {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize that the Yarn constraints file requires all packages to have an API, but in this case it seems we can make an exception. Perhaps we can remove this file as well as exports, main, and types from package.json and we can modify yarn.config.cjs to exclude this package from various checks that require these fields to be set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants